/**
 * 
 */
package fr.univ_tln.inf9.exaplanning.controleur.cours;

import java.util.Date;

import fr.univ_tln.inf9.exaplanning.api.cours.Course;
import fr.univ_tln.inf9.exaplanning.api.cours.event.*;

/**
 * @author ventura
 *
 */
public class CourseController {
	
	public CourseView listView = null;
	
	private Course course = null;
	
	public CourseController (Course timeSlot){
		this.course = course;
		
		addListenersToType();
	}
	
	private void addListenersToType() {
		course.addTypeListener(listView);
		
	}
	
	public void displayViews(){
		listView.display();
	}
	
	public void closeViews(){
		listView.close();
	}
	
	public void notifyTypeChanged(Course.Type type){
		course.setType(type);
	}
	
	
}
